package com.atguigu.cmn.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 数据字典API接口
 */
@FeignClient("service-cmn")
public interface DictFeignClient {

    /**
     * 获取数据字典名称
     *
     * @param value    value
     * @param dictCode dict类型代码
     * @return {@code String}
     */
    @GetMapping(value = "/admin/cmn/dict/getName/{parentDictCode}/{value}")
    String getName(@PathVariable("parentDictCode") String dictCode, @PathVariable("value") String value);

    /**
     * 获取数据字典名称
     *
     * @param value value
     * @return {@code String}
     */
    @GetMapping(value = "/admin/cmn/dict/getName/{value}")
    String getName(@PathVariable("value") String value);
}
